﻿var addNewPeport;
$().ready(function () {
    addNewPeport = new AddNewPeport();
    addNewPeport.Initialize();
});

function AddNewPeport() {
    this.Initialize = function () {
        if ($("#ProjectID").val() == null) {
            $("#ProjectID").val(0);
            $("#ProjectID").attr("disabled", true);
            $("#addReport").attr("disabled", true);

            $("#errors").text("You are not are not in one project");
        }

        if ($("#ReportingPeriodID").val() == null) {
            $("#ReportingPeriodID").val(0);
            $("#ReportingPeriodID").attr("disabled", true);
            $("#addReport").attr("disabled", true);

            $("#reportPeriodIDError").text("Are no open reported periods");
        }
    }
}